package socket;

import java.util.Arrays;

public class Test {
    public static void main(String[] args) {
        int[] allOut = {1,2,3,4,5,6,7,8,34,76,234,769,45346};
        int pw = 34;
        System.out.println("allOut:"+ Arrays.toString(allOut));
        //将pw的值从数组allOut中删除
        for(int i=0;i<allOut.length;i++){
            if(allOut[i]==pw){
                allOut[i] = allOut[allOut.length-1];
                allOut = Arrays.copyOf(allOut,allOut.length-1);
                break;
            }
        }

        System.out.println("allOut:"+ Arrays.toString(allOut));
    }
}
